<include file="Public:header" />
<section role="main" class="content-body">
    <header class="page-header"></header>
    <!-- start: page -->
    <section class="panel">
        <header class="panel-heading">
            <h2 class="panel-title">新会员注册</h2></header>
        <div class="panel-body">
            <form class="selects-form" id="form" role="form" method="post" autocomplete="off">
                <div class="row">
                    <label class="col-md-2 control-label">账号名称</label>
                    <div class="col-md-6">
                        <input class="form-control mb-md" type="text" id="username" name="username" placeholder="" value=""></div>
                </div>
                <div class="row">
                    <label class="col-md-2 control-label">姓名</label>
                    <div class="col-md-6">
                        <input class="form-control mb-md" type="text" name="realname" id="realname" placeholder="" value=""></div>
                </div>
                <div class="row">
                    <label class="col-md-2 control-label">国家</label>
                    <div class="col-md-6">
                        <select style="margin-bottom:15px" class="form-control" id="country" name="country">
                            <option value="">请选择。。。</option>
							<volist name="country" id="vo">
								<option value="{$vo['id']}" >{$vo['name']}</option>
							</volist>
						</select>
                    </div>
                </div>
                <div class="row">
                   <label class="col-md-2 control-label">手机号码</label>
                    <div class="col-md-6">
                        <input class="form-control mb-md" name="phone" id="phone" >
                 </div>
               
                </div>
               <!--  <div class="row" style="margin-top:15px">
                    <label class="col-md-2 control-label">手机验证码</label>
                    <div class="col-md-6">
                        <input class="form-control mb-md"  type="text" name="phone_code" placeholder="" value=""></div>
                </div> -->
                <div class="row">
                    <label class="col-md-2 control-label">电子邮箱</label>
                    <div class="col-md-6">
                        <input class="form-control mb-md" type="text" name="email" id="email" placeholder="" value="">
                    </div>
                </div>
                <div class="row">
                    <label class="col-md-2 control-label">推荐人戶名</label>
                    <div class="col-md-6">
                        <input class="form-control mb-md" type="text" name="tuiname" id="tuiname" placeholder="" value="{$home_user_info['username']}">
                        <label id="sponser-name"></label>
                    </div>
                </div>
                <div class="row">
                    <label class="col-md-2 control-label">安置人户名</label>
                    <div class="col-md-6">
                        <input class="form-control mb-md" type="text" id="jiename" name="jiename" placeholder="" value="{$Think.get.jiename}">
                        <input type="hidden" id="placement-name" value=""></div>
                </div>
                <div class="row">
                    <label class="col-md-2 control-label">安置人位置</label>
                    <div class="col-md-8">
                        <div class="radio i-checks col-lg-1">
                            <label>
                                <input id="placement-left" type="radio" value="1" name="quyu" checked="checked" class="has-value">
                                <i>
                                </i>左</label>
                        </div>
                        <div class="radio i-checks col-lg-1" style="margin-top:10px">
                            <label>
                                <input id="placement-right" type="radio" value="2" name="quyu"  class="has-value">
                                <i>
                                </i>右</label>
                        </div>
                        <!-- <div class="radio i-checks col-lg-1" style="margin-top:10px">
                            <label>
                                <input id="placement-right" type="radio" value="3" name="quyu"  class="has-value">
                                <i>
                                </i>右</label>
                        </div> -->
                    </div>
                </div>
                <div class="row">
                    <label class="col-md-2 control-label">会员注册</label>
                    <div class="col-md-6">
                        <select class="form-control mb-md" id="sl-package" type="text" name="leavel" placeholder="">
                           <option value="0">请选择。。。</option>
							<volist name="leavel_type" id="vo">
								<option value="{$vo['id']}" >{$vo['name']}</option>
							</volist>
						</select>
                    </div>
                </div>
                <div class="row">
                    <div class="form-group">
                        <label class="col-lg-2 control-label" for="color"></label>
                        <div class="col-lg-3" style="margin-bottom:15px;">
                            <label id="d-point-err" style="display: none; color: tomato">余额不足</label>
                            <br>
                           <!--  <button class="btn btn-default" type="button">{$currency[6]['name']}:
                                <strong>{$user_money['6']['num']}个</strong></button> -->
                        </div>
					</div>
                </div>
                <br>
                <div class="row">
                    <label class="col-md-2 control-label">二级密码</label>
                    <div class="col-md-6">
                        <input class="form-control mb-md" type="password" name="twopassword" placeholder="请输入您的二级密码" id="twopassword" value=""></div>
                </div>
                <br>
                <div class="row">
                    <label class="col-md-2 control-label"></label>
                    <div class="col-md-6">
                        <input class="" type="checkbox" name="agree" id="twopassword" value="agree">我已阅读并同意 <a href="javascript:reg_agree();" >会员注册协议</a></div>
                </div>
                <div class="row">
                    <div class="col-md-12 text-right">
                        <!-- <button id="" class="btn btn-primary" type="submit">提交</button>-->
                        <button id="btn-confirm" type="button" onclick="sub()" class="btn btn-primary modal-confirm">提交</button>
                        <a href="dashboard.php" class="btn btn-default modal-dismiss">取消</a></div>
                </div>
            </form>
        </div>
    </section>
</section>
		<script>
			function sub(){
				$.ajax({
					 type: "POST",
					 url: "{:U('Team/registerSub')}",
					 data: $("#form").serialize(),
					 dataType: "json",
					 error: function(request) {
						layer.closeAll('loading');
						layer.msg("{$Think.lang.系统繁忙请稍后再试}");
					},
					beforeSend: function() {
						var index = layer.load(1, {
						  shade: [0.1,'#fff'] 
						});
					},
					 success: function(data){
							layer.closeAll('loading');
							layer.msg(data['info']);
							if(data['status']==true){
								<!-- setTimeout(function(){self.location.href="{:U('Team/index')}"},1000); -->
							}
						}
				});
			};
			
			function sendcode(){
			var i=120;
			var tid2;
			tid2=setInterval(function(){
				if($("#msgt").attr("data-key")=='off'){
					$("#msgt").attr("disabled",true);
					$("#msgt").removeClass("class");
					$("#msgt").addClass("button again");
					i--;
					$("#msgt").val(i+"秒后再次发送");
					if(i<=0){
						$("#msgt").removeAttr("disabled").val("暂时无法发送");
						$("#msgt").attr("data-key","off");
						clearInterval(tid2);
					}
				}
			},1000);
			var phone=$('#phone').val();
				$.post("{:U('Team/sendRegPhoneCode')}",{'phone':phone},function(d){
							if(d.status){
						           layer.msg('验证码发送成功');
								i=120;
								$("#msgt").attr("data-key","off");
							 }else{
								   layer.msg('验证码发送失败');
							 }
				});
		}

		</script>
		<script>
			function reg_agree(){
				$('#reg_arrge').toggle();
			}
		</script>
			<div id="reg_arrge" class="modal in" role="dialog" aria-hidden="false"  onclick="reg_agree()"> <!-- style="display: block;" -->
				<div class="modal-backdrop  in" style="height: 949px;"></div>
                <div class="modal-dialog modal-lg">
                    <!-- Modal content-->
					<div class="modal-content box-ann">
						<div class="modal-header box-head">
							<h2 class="modal-title">
								<img src="__PUBLIC__/Home/image/logo.png" alt="." height="auto" style="width:10%;margin-top:10px;max-height: none !important" width="30%" class="">注册协议</h2></div>
						<div class="modal-body">
							<p>
								<strong>至：尊贵的家人们</strong></p>
							<p>
							<p>
								<strong>To: Respected members</strong></p>
							<p>
								<strong>Renew Fund Points Explanation</strong></p>
							<p>Passive fund points will be changed to Renew Fund Points.</p>
							<p>The passive capping for 10000usd package is 55000usd, renew fund points will be 15% of the capping = 8250 renew fund points.</p>
							<p>When the members account reaches the capping, members can reactivate their accounts using 70% register points and 30% activation points. After reactivation, the member will receive 5500 fund points and 8250 renew fund points.</p>
							<p>By reactivating, your account will have a total of 13750 points to allocate e-share, this will rapidly shorten the time to increase your wealth.</p>
							<p>&nbsp;</p>
						</div>
						<div class="modal-footer">
							<button style="margin-right:45%" class="btn btn-success" id="memoclose" data-dismiss="modal">确定</button></div>
					</div>
                </div>
            </div>
<include file="Public:footer" />